home *** CD-ROM | disk | FTP | other *** search
-
- ****************************************************
-
- rndinit: move.b $dff007,d0
- asl.w #8,d0
- move.b $dff007,d0
- swap d0
- move.b $dff007,d0
- asl.w #8,d0
- move.b $dff007,d0
- move.l d0,rndnumber
- rts
-
- rnd: move.l rndnumber,d1
- and.l #$0ff00000,d1
- swap d1
- lsr.w #4,d1
-
- move.l rndnumber,d2
- asl.l #1,d2
- eor.l #$87654321,d2
- asl.l #1,d2
- eor.l d1,d2
- eor.l #$fedcba97,d2
- add.l d1,d2
- move.l d2,rndnumber
-
- move.l rndnumber,d1
- swap d1
- and.l #$0000ffff,d1
- ext.l d0
- divu d0,d1
-
- move.w d1,d2
- ;add.b $dff007,d2
- ext.l d2
- add.l d2,rndnumber
- swap d1
-
- rts
-
- rndnumber: dc.l $54d2e507
-
-
- ****************************************************
-
-